package com.aaa.entity;


import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Table(name = "t_menu")
@Data
//@ApiModel(value = "TMenu)", description = "")
public class TMenu implements Serializable {
    private static final long serialVersionUID = 644810737152913617L;
    @Id
    @Column(name = "id")
    private Integer id;

    @Column(name = "mname")
    //@ApiModelProperty(value = "菜单的名字")
    private String mname;
    
    @Column(name = "pid")
    //@ApiModelProperty(value = "0 代表的是一级菜单")
    private Integer pid;
    
    @Column(name = "url")
    //@ApiModelProperty(value = "给菜单指定一个路径")
    private String url;
    
    @Column(name = "icon")
    //@ApiModelProperty(value = "图标")
    private String icon;

    // 一个父菜单下面有多个子菜单  t_menu
    @Transient // 通用mapper里面进行查询的时候该属性不参与查询
    private List<TMenu> sonMenus=new ArrayList<>();

}

